#ifndef __GAMEHACK_GAMEHACK_SOURCE_UTILITY_HPP__
#define __GAMEHACK_GAMEHACK_SOURCE_UTILITY_HPP__

template<typename T>
class delete_helper
{
public:
	delete_helper()
		: pointer_(NULL)
	{}
	delete_helper(T* p)
		: pointer_(p)
	{}
	~delete_helper()
	{
		delete pointer_;
	}
	void operator=(T* p)
	{
		pointer_ = p;
	}
	T* operator&()
	{
		return pointer_;
	}
	bool operator==(T* p)
	{
		return pointer_ == p;
	}
private:
	T* pointer_;
};
#endif//__GAMEHACK_GAMEHACK_SOURCE_UTILITY_HPP__